using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CSharpCustomControls
{
    [ToolboxData("<{0}:FifthSample runat=server></{0}:FifthSample>")]
    public class FifthSample : WebControl
    {
        protected override void CreateChildControls()
        {
            System.Web.UI.WebControls.TextBox txt1;
            System.Web.UI.WebControls.TextBox txt2;
            System.Web.UI.WebControls.Style stl;

            stl = new System.Web.UI.WebControls.Style();
            stl.ForeColor = System.Drawing.Color.Red;
            stl.Font.Bold = true;
            stl.BorderWidth = 12;

            txt1 = new System.Web.UI.WebControls.TextBox();
            txt1.ID = "Text1";
            txt1.Text = "Hello";
            txt1.ApplyStyle(stl);
            this.Controls.Add(txt1);

            txt2 = new System.Web.UI.WebControls.TextBox();
            txt2.ID = "Text2";
            txt2.Text = "World";
            txt2.ApplyStyle(stl);
           this.Controls.Add(txt2);

        }
    }
}
